/*
 * @Descripttion: 
 * @version: 
 * @Author: cyj
 * @Date: 2023-04-17 12:50:25
 */
const express = require('express')

const router = express.Router()
//导入发送邮件模块
const email = require('../dao/emailLink')

//导入注册路由模块
const userRouter = require('../router_handle/user')

//注册用户
router.post('/register', (req, res) => {
    let m = req.body.email
    //发送邮件
    email.emailSignUp(m, res)

    userRouter.regUser(req, res)
})

//用户登录
router.post('/login', userRouter.login)

//验证用户密码是否正确
router.post('/checkPwd', userRouter.checkPwd)


//验证token
router.post('/veriftoken', userRouter.verifToken)

module.exports = router